<template>
	<div class="case-details" v-if="viewModel">
		<div v-html="conversionInit(viewModel.content)"></div>
	</div>
</template>
<script>
	export default {
		data() {
			return {
				viewModel: null
			}
		},
		mounted() {
			this.init()
		},
		methods: {
			async init() {
				this.viewModel = await this.$ala.httpGet('Api/topline/QueryById', {
					id: this.$route.query.id
				})
			},
			conversionInit(data) {
				var value = data.replace(new RegExp('src="../../', 'g'), `src="${this.$ala.host}`)
				return value
			}
		}
	}
</script>
<style lang="scss">
	.case-details {
		padding: 20px 30px;
		box-sizing: border-box;

		div,
		p,
		span {
			font-size: 20px;
			color: #6B6B6B;
			line-height: 2;
		}

		strong {
			font-size: 25px;
			color: #292929;
		}
	}
</style>